package advanced.design_mode.observermode;

/**
 * 观察者者类型A
 */
public class ObserverA implements Observer {
    //观察的目标对象
    private Subject subject;

    @Override
    public void update(Subject subject) {
        System.out.println("观察到值发生了改变, 马上更新");
        this.subject = subject;
        this.subject = subject;
    }

    public ObserverA() {

    }
}
